import { createRouter, createWebHashHistory } from 'vue-router'
import Student from '../components/form/Student.vue'
import Education from '../components/form/Education.vue'
import Work from '../components/form/Work.vue'
import Health from '../components/form/Health.vue'
import Hello from '../components/form/Hello.vue'
import MyForm from '../components/form/MyForm.vue'
import NewForm from '../components/form/NewForm.vue'
import Login from '../components/security/Login.vue'
import App from '../App.vue'
import { createLoadingComponent } from 'element-plus/es/components/loading/src/loading'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        // { path: '/', redirect: '/login' },
        {
            path: '/', component: App, name: 'app',
            children: [
                { path: '/login', component: Login, name: 'login' },
            ]
        },
        {
            path: '/newform', component: NewForm, name: 'newform',
            children: [
                { path: '/education', component: Education, name: 'education' },
                { path: '/student', component: Student, name: 'student' },
                { path: '/education', component: Education, name: 'education' },
                { path: '/work', component: Work, name: 'work' },
                { path: '/health', component: Health, name: 'health' }
            ]
        },
        { path: '/myForm', component: MyForm, name: 'myform' },

        { path: '/hello', component: Hello, name: 'hello' },
        { path: '/login', component: Login, name: 'login' },
    ],
})

export default router